
#include <unistd.h>

#include <iostream>

#include <boost/date_time/posix_time/posix_time.hpp>

using namespace boost::posix_time;

int	main(void)
{
	ptime	t1 = microsec_clock::local_time();

	sleep( 1 );

	ptime	t2 = microsec_clock::local_time();

	time_period	tp(t1, t2);
	time_duration	td = tp.length();

	long	time_last_ms = td.total_milliseconds();
	std::cout << "time last " << time_last_ms << " milliseconds\n";

	return	0;
}

